package edu.gatech.cs2340.OregonTrail;


import edu.gatech.cs2340.OregonTrail.EventSystem.ActorListener;
import edu.gatech.cs2340.OregonTrail.EventSystem.CommCoordinator;

/**
 * Defines common attributes and behaviors for player professions
 * @author Won Taek Chung
 * @version 1.0.1
 */
public abstract class Player implements ActorListener{
	private CommCoordinator communicator;
	protected PlayerInventory inventory;
	
	public void addCommunicator(CommCoordinator comm){
		communicator = comm;
		communicator.AddActorListener(this);
	}
	/**
	 * Getter for player's name
	 * @return The player's name
	 */
	public abstract String getName();

	/**
	 * Setter for the player's name
	 * @param name New name to use for player
	 */
	public abstract void setName(String name);

	/**
	 * Getter for break chance
	 * @return Player's chance of a wagon break
	 */
	public abstract double getBreakC() ;

	/**
	 * Setter for break change
	 * @param breakC New break chance to use for player
	 */
	public abstract void setBreakC(double breakC);
	public abstract void setSickC(double sickC);
	/**
	 * Getter for player's money
	 * @return Player's money amount (in dollars)
	 */
	public abstract int getMoney();

	/**
	 * Setter for player's money 
	 * @param money New money amount (in dollars) to use for player
	 */
	public abstract void setMoney(int money);
	
	/**
	 * Setter for player's status
	 * @param status eStatus enum value (alive/dead) to use as player's status
	 */
	public abstract void setStatus(eStatus status);
	
	/**
	 * Getter for player's status
	 * @return eStatus enum value (alive/dead) representing player's current status
	 */
	public abstract eStatus getStatus();
	
	public void addInventory(PlayerInventory pInv){
		inventory = pInv;
	}
	
	public PlayerInventory getInventory() {
		return inventory;
	}
	
	public abstract double getSickC();

}
